package com.moonshineproject.plugin.project.vo
{
	import com.moonshineproject.plugin.settings.vo.SettingsWrapper;
	
	import flash.filesystem.File;
	
	public class ProjectVO
	{
		/** The root project folder */
		public var folder:File;
		
		/* The file selected to open the project */
		public var projectFile:File;
		
		public function ProjectVO(folder:File)
		{
			if (!folder) folder = File.documentsDirectory;
			this.folder = folder;
		}
		
		private var _projectFolder:FileWrapper;
		public function get projectFolder():FileWrapper
		{
			// Build project folder when it's needed
			//  does a full recurse down all dirs
			if (!_projectFolder)
			{
				_projectFolder = new FileWrapper(folder, true);
			}
			
			return _projectFolder;
		}
		
		public function get name():String {
			return folder.name;
		}
		
		public function get folderPath():String {
			return folder.nativePath;
		}
		public function set folderPath(v:String):void {
			folder.nativePath = v;
		}
		
		public function saveSettings():void	{
			throw new Error("saveSettings() not implemented yet");
		}
		
		public function getSettings():Vector.<SettingsWrapper>
		{
			return Vector.<SettingsWrapper>([]);
		}
	}
}